home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_349 / med / source / med200src.zoo / med.h < prev    next >
C/C++ Source or Header  |  1990-04-03  |  4KB  |  121 lines

  1. /* MED.h V 2.000 10.03.1990 -- by Teijo Kinnunen, 1990 */
  2.  
  3. struct Lohko {    /* one block (4 tracks) */
  4.     UBYTE    numtracks;
  5.     UBYTE    pad[3];
  6.     UBYTE    music[3 * 64 * 4]; /* at least 768 */
  7. };
  8. #define FOURTRKSIZE (3 * 64 * 4)
  9. #define ONETRKSIZE (3 * 64)
  10.  
  11. #define ALATEEMITAAN 0 /* Play commands (these are ancient from V1.12) */
  12. #define SOITALOHKO 1
  13. #define SOITAKAPPALE 2
  14. #define OHJELMANLOPPU 3
  15. #define SEIS 4
  16. #define SOITANUOTTI 5
  17.     /* Playing state */
  18. #define ALASOITA 0        /* don't play */
  19. #define SOITALOHKOA 1        /* playing block */
  20. #define SOITAKAPPALETTA 2    /* playing song */
  21.     /* Flags */
  22. #define    LIPPU_SUODATINPAALLA    0x1    /* filter on */
  23. #define    LIPPU_HYPPELYPAALLA    0x2    /* jumping on */
  24. #define    LIPPU_HYPPELYTAHTIIN    0x4    /* every 8th */
  25. #define    LIPPU_SOITTIMETMUKANA    0x8    /* instruments attached (MOD) */
  26.  
  27. struct Kappale111 { /* 1.11/1.12 */
  28.     ULONG id; /* sisältää "MED\x02" versiolle 1.11 */
  29.     char soitin[32][40];
  30.     UBYTE soittimenvoimakkuus[32];
  31.     UWORD stoisto[32];
  32.     UWORD stoistonpit[32];
  33.     UWORD lohkoja; /* montako lohkoa kappaleessa on */
  34.     UBYTE soittojarjestys[100]; /* lohkojen soittoj... */
  35.     UWORD kappaleen_pituus; /* montako soittojärjestystä */
  36.     UWORD tempo; /* kappaleen tempo, jos ei ilmoitettu komennolla xFxx */
  37.     UWORD liput;
  38.     UWORD vaihtoja; /* 5 tai 6 */
  39.     ULONG hyppysoitin; /* jokainen bitti on 1 soitin */
  40.     UWORD rgb[8]; /* vain 4 nyt käytössä */
  41. };
  42.  
  43. struct Kappale { /* The song structure for MED V2.00 */
  44.     ULONG id;            /* contains "MED\x03" for V2.00 */
  45.     char soitin[32][40];        /* names of the instruments */
  46.     UBYTE soittimenvoimakkuus[32];    /* volumes */
  47.     UWORD stoisto[32];        /* repeats */
  48.     UWORD stoistonpit[32];        /* rep. lengths */
  49.     UWORD lohkoja;            /* number of blocks in the song */
  50.     UBYTE soittojarjestys[100];    /* the playing sequence */
  51.     UWORD kappaleen_pituus;        /* length of the playing sequence */
  52.     UWORD tempo;            /* initial tempo */
  53.     BYTE  playtransp;        /* play transpose */
  54.     UBYTE liput;            /* flags */
  55.     UWORD vaihtoja;            /* sliding (5 or 6) */
  56.     ULONG hyppysoitin;        /* jumping mask */
  57.     UWORD rgb[8];            /* screen colors */
  58.     UBYTE midikanava[32];        /* midi channels */
  59.     UBYTE midipreset[32];        /* & presets */
  60. };
  61.  
  62. struct ObjSong {    /* in object files */
  63.     UBYTE vol[32];            /* offs = 0 */
  64.     UWORD rep[32],replen[32];    /* offs = 32, offs = 96 */
  65.     UWORD blocks;            /* offs = 160 */
  66.     UBYTE playseq[100];        /* offs = 162 */
  67.     UWORD songlen;            /* offs = 262 */
  68.     BYTE  playtransp;        /* offs = 264 */
  69.     UBYTE flags;            /* offs = 265 */
  70.     UWORD slide;            /* offs = 266 */
  71.     UBYTE midichan[32],midipres[32]; /* offs = 268, offs = 300 */
  72. };
  73.  
  74. struct SoundTrackerIns { /* SoundTracker instrument */
  75.     char sti_nimi[22];
  76.     UWORD sti_pit;        /* length of the sample / 2 */
  77.     UWORD sti_vol;        /* volume */
  78.     UWORD sti_repeat;    /* repeat */
  79.     UWORD sti_replen;    /* repeat length */
  80. };
  81.  
  82. struct SoundTrackerKappale { /* old SoundTracker song */
  83.     char st_nimi[20];
  84.     struct SoundTrackerIns st_ins[15];
  85.     UBYTE st_kappaleen_pit;    /* song length */
  86.     UBYTE st_kummajainen; /* 0x78 (could anybody tell me what's this) ?? */
  87.     UBYTE st_lohkojarj[128];
  88. };
  89.  
  90. struct MEDSoftIntCmd {    /* a bit ancient too */
  91.     UWORD msic_cmd;
  92.     ULONG msic_data;
  93.     UWORD msic_soitin;
  94.     UBYTE msic_aani;
  95.     UBYTE pad;
  96. };
  97.  
  98. struct Soitin {    /* a small sample structure */
  99.     ULONG    length;
  100.     UWORD    type;
  101.     /* Followed by digitized data */
  102. };
  103.  
  104. #define    IFF5OCT    1    /* types */
  105. #define    IFF3OCT    2
  106.  
  107. struct ST24Mod {
  108.     char songname[20];
  109.     struct {
  110.         char name[22];
  111.         UWORD length;
  112.         UWORD volume;
  113.         UWORD repeat;
  114.         UWORD replen;
  115.     } sample[31];
  116.     UBYTE songlen;
  117.     UBYTE I_dont_know_what_this_byte_is;
  118.     UBYTE playseq[128];
  119.     ULONG mk; /* contains M.K. ??? (ST songs are full of enigmas ;-) */
  120. };
  121.